package com.chh.exam.survey.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 
 * @TableName wj_survey
 */
@TableName(value ="wj_survey")
@Data
public class Survey implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 描述
     */
    private String description;

    /**
     * 状态 0编辑中 1已就绪 2 已发布
     */
    private Integer status;

    /**
     * 答卷数
     */
    private Integer answerTotal;

    /**
     * 星标
     */
    private Integer star;

    /**
     * 0正常 1回收站
     */
    private Integer deleted;

    /**
     * 问卷创建者id
     */
    private Integer userId;

    /**
     * 时长限制
     */
    private Integer timeLimit;

    /**
     * 
     */
    private Date fcd;

    /**
     * 
     */
    private Date lud;


    @TableField(exist = false)
    private List<SurveyQuestion> examineeList;
    @TableField(exist = false)
    private List<SurveyQuestion> questionList;


//    @TableField(exist = false)
//    private String statusDesc;
//    public String getStatusDesc(){
//        if(status == 0){
//            return "编辑中";
//        }else if(status == 1){
//            return "已就绪";
//        }else if(status == 2){
//            return "已发布";
//        }else{
//            return "未知";
//        }
//    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public void setExamineeList(List<SurveyQuestion> examineeList) {
    }
}